/**
 * 
 */
package com.gko100.action;

import java.util.List;

import com.gko100.action.base.AdminBaseAction;
import com.gko100.model.Administrator;
import com.gko100.model.Permission;

/**
 * @author Administrator
 *
 */
public class PermAction extends AdminBaseAction {
	
	private Permission perm;
	private Administrator admin;
	private List<Permission> permList;
	
	public Permission getPerm() {
		return perm;
	}
	public void setPerm(Permission perm) {
		this.perm = perm;
	}
	public Administrator getAdmin() {
		return admin;
	}
	public void setAdmin(Administrator admin) {
		this.admin = admin;
	}
	public List<Permission> getPermList() {
		return permList;
	}
	public void setPermList(List<Permission> permList) {
		this.permList = permList;
	}
	
	public String insert_perm(){
		
		this.setPermList(adminManager.findPermList());
		return "perm_insert_success";
	}
	
	public String add_perm() throws Exception {
		
		adminManager.add_perm(this.getPerm());
		
		return "perm_add_success";
	}
	
	public String upload_perm(){
		
		return "perm_upload_success";
	}
	
	public String modify_perm() throws Exception {
		
		
		return "perm_modify_success";
	}
	
	public String find_perm() throws Exception {
		
		
		return "perm_find_success";
	}
	
	
}
